03. Encounter Representation

Encounter Representation

ND320 AIHCND C01 L03 A03 Encounter Representation V2

Encounter Representation Key Points

What is an Encounter? [Encounter Definitions](https://www.hl7.org/fhir/encounter-definitions.html)

What is an Encounter? Encounter Definitions

Encounter: “An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.”

What is an encounter?

The definition of an encounter commonly used for EHR records comes from the Health Level Seven International (HL7), the organization that sets the international standards for healthcare data. As the definition states, it is essentially an interaction between a patient and a healthcare professional(s).
It usually refers to doctors visits and hospital stays.

How do we aggregate line level at encounter level?

  1. Create a column list for the columns you would use to group. Likely these would be:

    • "encounter_id"
    • "patient_id"
    • "principal_diagnosis_code"
  2. Create column list for the other columns not in the grouping

  3. Transform your data into a new dataframe. You can use groupby() and agg() functions for this

  4. Then you can do a quick inspection of the result by grabbing one of the patient records and to compare the output of the original dataframe and the newly transformed encounter dataframe.

Note: The data used in the walkthrough was created just to show you how this would work. You'll practice this more in later exercises as well.

Additional Resources

Code

If you need a code on the https://github.com/udacity.